home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 3.iso / screensavers / saver17.zip / VoodooLights / Sources / cell.h < prev    next >
C/C++ Source or Header  |  1997-07-24  |  1KB  |  57 lines

  1. #ifndef _CELL_H_
  2. #define _CELL_H_
  3.  
  4. #define MaxChildren 4
  5.  
  6. typedef enum {
  7.     ALIVE, DYING, DEAD
  8. } CellStatus ;
  9.  
  10. typedef struct Cell {
  11.   int type ;
  12.   CellStatus status ;
  13.   struct Cell *dad ;
  14.   struct Cell *children[ MaxChildren] ;
  15.   XYZ pos, vel, acc ;
  16.   RGBA color ;
  17.  
  18.   XYZW lpos ;
  19.  
  20.   Float age ;
  21.   Float adulthood ;
  22.   Float p_chld ;
  23.   Float max_speed ;
  24.   Float size ;
  25.  
  26.   Float sparkle ;
  27.   Float sparkle_range ;
  28.   Float sparkle_min ;
  29.  
  30.   int n_chld, max_chld ;
  31.   int generation ;
  32.  
  33.   void (*move_cell)( struct Cell * ) ;
  34.   void (*acc_cell)( struct Cell *) ;
  35.   
  36.   void (*age_cell)(struct Cell *) ;
  37.   void (*reproduce_cell)(struct Cell *) ;
  38.   void (*display_cell)(struct Cell *) ;
  39.  
  40.   int index ; // para ajudar na destruiτπo
  41. } Cell ;
  42.  
  43. typedef void (*set_glide_state_proc)( void ) ;
  44.  
  45. extern Cell *cell_Constructor( int type ) ;
  46.  
  47. extern void cell_Destructor( Cell *c ) ;
  48.  
  49. extern Cell **cell_get_cells_by_type( int type, int *n) ;
  50.  
  51. extern void cell_menopause( Cell *c ) ;
  52.  
  53. extern void cell_InitModule( void ) ;
  54.  
  55. extern Float dt ;
  56.  
  57. #endif